#include <stdio.h>
#include <string.h>
#include "app/app_runner.h"
#include "ota/ota_version.h"
#include "daemon/daemon_runner.h"

int main(int argc, char const *argv[])
{
    if (argc == 1)
    {
        printf("请传入参数 : (app|ota|daemon|version|update) \n");
        return -1;
    }
    if (strcmp(argv[1], "app") == 0)
    {
        App_runner_run();
    }
    else if (strcmp(argv[1], "ota") == 0)
    {
        ota_version_check_daily();
    }
    else if (strcmp(argv[1], "daemon") == 0)
    {
        // daemon..
        daemon_runner_start();

    }
    else if (strcmp(argv[1], "version") == 0)
    {
        // version..
        ota_version_printf();
    }
    else if (strcmp(argv[1], "update") == 0)
    {
        // update..
        ota_version_check_and_update();
    }
    return 0;
}
